package com.lfk.justweengine.anim;

import com.lfk.justweengine.utils.script.Float2;
import ohos.agp.utils.Point;
import ohos.agp.utils.Rect;
import org.junit.Assert;
import org.junit.Test;


public class WrapMoveAnimationOhosTest {

    @Test
    public void adjustPosition() {
        Rect rect = new Rect(100,200,300,400);
        Point point = new Point(50,60);
        Float2 float2 = new Float2(70,80);
        WrapMoveAnimation wrapMoveAnimation = new WrapMoveAnimation(rect, point, float2);
        Float2 floatResult = wrapMoveAnimation.adjustPosition(new Float2());
        float[] expecteds = new float[2];
        expecteds[0] = float2.x;
        expecteds[1] = float2.y;
        float[] actuals = new float[2];
        actuals[0] = (float)70;
        actuals[1] = (float)80;
        Assert.assertArrayEquals(expecteds, actuals, (float)2);
    }
}